package com.dlc.shop.mp.common.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dlc.shop.mp.common.dao.WeixinSubscribeMapper;
import com.dlc.shop.mp.common.model.WeixinSubscribe;
import com.dlc.shop.mp.common.service.WeixinSubscribeService;
import lombok.AllArgsConstructor;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 * @author lgh on 2019/01/16.
 */
@Service
@AllArgsConstructor
public class WeixinSubscribeServiceImpl extends ServiceImpl<WeixinSubscribeMapper,WeixinSubscribe> implements WeixinSubscribeService {

    private final WeixinSubscribeMapper weixinSubscribeMapper;

    @Override
    @Cacheable(cacheNames="WeixinSubscribeList",key="1")
    public List<WeixinSubscribe> listWeixinSubscribeAndMaterial() {
        return weixinSubscribeMapper.listWeixinSubscribeAndMaterial();
    }

    @Override
    @CacheEvict(cacheNames="WeixinSubscribeList",key="1")
    public void removeWeixinSubscribeAndMaterial() {
    }
}
